import datetime


def date_caculate(ndays):
    now = datetime.datetime.now()
    day = now - datetime.timedelta(days=int(n))
    print(f'{n}天前是{day}')


n = input('请输入你想知道几天前的日期')
date_caculate(n)
